import dayjs, { Dayjs } from 'dayjs'

export function rangeToDisplay (dataRange : string) : string {
    let range = dataRange.split('-').map(e => parseInt(e));
    return range.map(e => dayjs(e).format("YYYY-M-D HH:mm")).join(' 至 ');
}

export function rangeToDayjs (dataRange : string) : Dayjs[] {
    let range = dataRange.split('-').map(e => parseInt(e));
    return range.map(e => dayjs(e));
}